package com.admission.model;

import javax.persistence.Basic;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.Lob;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import com.admission.listener.AuditableEntity;

//在线查询回复
@Entity
@Table(name = "message_reply")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class MessageReply extends AuditableEntity {
	private String content;// 回复内容
	private Message message;
	
	@Lob
	@Basic(fetch = FetchType.LAZY)
	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	@OneToOne
	@JoinColumn(name = "message_id")
	public Message getMessage() {
		return message;
	}

	public void setMessage(Message message) {
		this.message = message;
	}

}
